﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace Studio77.CrazyJigsaw.Entities
{
    public class StageItemViewModel : DependencyObject
    {
        public int Index
        {
            get { return (int)GetValue(IndexProperty); }
            set { SetValue(IndexProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Index.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IndexProperty =
            DependencyProperty.Register("Index", typeof(int), typeof(StageItemViewModel), new PropertyMetadata(0));



        /// <summary>
        /// 关卡类型 s-风景 a-动物 c-卡通
        /// </summary>
        public string StageType
        {
            get { return (string)GetValue(StageTypeProperty); }
            set { SetValue(StageTypeProperty, value); }
        }

        // Using a DependencyProperty as the backing store for StageType.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty StageTypeProperty =
            DependencyProperty.Register("StageType", typeof(string), typeof(StageItemViewModel), new PropertyMetadata(string.Empty));



        public double AimRotated
        {
            get { return (double)GetValue(AimRotatedProperty); }
            set { SetValue(AimRotatedProperty, value); }
        }

        // Using a DependencyProperty as the backing store for AimRotated.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty AimRotatedProperty =
            DependencyProperty.Register("AimRotated", typeof(double), typeof(StageItemViewModel), new PropertyMetadata(0d));




        public ImageSource StageImage
        {
            get { return (ImageSource)GetValue(StageImageProperty); }
            set { SetValue(StageImageProperty, value); }
        }

        // Using a DependencyProperty as the backing store for StageImage.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty StageImageProperty =
            DependencyProperty.Register("StageImage", typeof(ImageSource), typeof(StageItemViewModel), new PropertyMetadata(null));



        public int Score
        {
            get { return (int)GetValue(ScoreProperty); }
            set { SetValue(ScoreProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Score.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ScoreProperty =
            DependencyProperty.Register("Score", typeof(int), typeof(StageItemViewModel), new PropertyMetadata(0));


        public string GameTime
        {
            get { return (string)GetValue(GameTimeProperty); }
            set { SetValue(GameTimeProperty, value); }
        }

        // Using a DependencyProperty as the backing store for GameTime.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty GameTimeProperty =
            DependencyProperty.Register("GameTime", typeof(string), typeof(StageItemViewModel), new PropertyMetadata(""));

        public Visibility NoStarVisibility
        {
            get { return (Visibility)GetValue(NoStarVisibilityProperty); }
            set { SetValue(NoStarVisibilityProperty, value); }
        }

        // Using a DependencyProperty as the backing store for NoStarVisibility.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty NoStarVisibilityProperty =
            DependencyProperty.Register("NoStarVisibility", typeof(Visibility), typeof(StageItemViewModel), new PropertyMetadata(Visibility.Visible));

        public Visibility OneStarVisibility
        {
            get { return (Visibility)GetValue(OneStarVisibilityProperty); }
            set { SetValue(OneStarVisibilityProperty, value); }
        }

        // Using a DependencyProperty as the backing store for NoStarVisibility.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty OneStarVisibilityProperty =
            DependencyProperty.Register("OneStarVisibility", typeof(Visibility), typeof(StageItemViewModel), new PropertyMetadata(Visibility.Visible));

        public Visibility TwoStarVisibility
        {
            get { return (Visibility)GetValue(TwoStarVisibilityProperty); }
            set { SetValue(TwoStarVisibilityProperty, value); }
        }

        // Using a DependencyProperty as the backing store for NoStarVisibility.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TwoStarVisibilityProperty =
            DependencyProperty.Register("TwoStarVisibility", typeof(Visibility), typeof(StageItemViewModel), new PropertyMetadata(Visibility.Visible));

        public Visibility ThreeStarVisibility
        {
            get { return (Visibility)GetValue(ThreeStarVisibilityProperty); }
            set { SetValue(ThreeStarVisibilityProperty, value); }
        }

        // Using a DependencyProperty as the backing store for NoStarVisibility.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ThreeStarVisibilityProperty =
            DependencyProperty.Register("ThreeStarVisibility", typeof(Visibility), typeof(StageItemViewModel), new PropertyMetadata(Visibility.Visible));

        public Visibility LockVisibility
        {
            get { return (Visibility)GetValue(LockVisibilityProperty); }
            set { SetValue(LockVisibilityProperty, value); }
        }

        // Using a DependencyProperty as the backing store for NoStarVisibility.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty LockVisibilityProperty =
            DependencyProperty.Register("LockVisibility", typeof(Visibility), typeof(StageItemViewModel), new PropertyMetadata(Visibility.Collapsed));
    }

    public class StageItemViewModelCollection : ObservableCollection<StageItemViewModel>
    { }
}
